<template>
    <h3>AsyncComponent子组件</h3>
    <h3>{{msg}}</h3>
</template>

<script>
import {defineComponent, reactive, ref} from "vue";


export default defineComponent({
    name: "AsyncComponent",
    setup() {
        return new Promise((resolve, reject) => {
            setTimeout(()=>{
                resolve({msg:"2秒后显示"})
            }, 2000)
        })
    }
});

</script>

<style scoped>

</style>